
INCLUDE_DIRECTORIES(
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_CURRENT_BINARY_DIR}
)

CONFIGURE_FILE(
    ${CMAKE_CURRENT_SOURCE_DIR}/configuration.h.in
    ${CMAKE_CURRENT_BINARY_DIR}/configuration.h
)
SET( edf_SRCS
     edf/edfmodel.cpp
     edf/edfparser.cpp
     edf/edfsignalsource.cpp
     edf/edfdatarecord.cpp
     edf/edfsignaldata.cpp
     edf/edfreader.cpp
)

SET( montage_SRCS
     montage/montage.cpp
     montage/channel.cpp
     montage/channeldata.cpp
)

SET( montage_HDRS
     montage/montage.h
     montage/channel.h
     montage/channeldata.h
)

SET( util_HDRS
     util/defined.h
)

SET( eeg_HDRS
     eeg/eegstdpos.h
)
SET( biosignal_SRCS
     biosignal.cpp
     dataframe.cpp
     sourcesignal.cpp
     signaldata.cpp
     dataframeiterator.cpp
     reader.cpp
     datetime.cpp
     signalslice.cpp
     eeg/eegstdpos.cpp
     ${montage_SRCS}
     ${edf_SRCS}
)
SET( biosignal_HDRS
     biosignal.h
     dataframe.h
     sourcesignal.h
     sourcesignalposition.h
     signaldata.h
     dataframeiterator.h
     reader.h
     datetime.h
     signalslice.h
     ${CMAKE_CURRENT_BINARY_DIR}/configuration.h
)


ADD_LIBRARY(biosignal SHARED ${biosignal_SRCS})

#ADD_LIBRARY(biosignal_nonshared++  ${biosignal_SRCS})

INSTALL(TARGETS biosignal DESTINATION ${BIOSIGNAL_INSTALL_LIB_DIR}/${BIOSIGNAL_LIB_API} EXPORT biosignal-targets)
INSTALL(FILES ${biosignal_HDRS} DESTINATION ${BIOSIGNAL_INSTALL_INCLUDE_DIR}/${BIOSIGNAL_LIB_API}/biosignal)
INSTALL(FILES ${montage_HDRS} DESTINATION ${BIOSIGNAL_INSTALL_INCLUDE_DIR}/${BIOSIGNAL_LIB_API}/biosignal/montage)
INSTALL(FILES ${util_HDRS} DESTINATION ${BIOSIGNAL_INSTALL_INCLUDE_DIR}/${BIOSIGNAL_LIB_API}/biosignal/util)
INSTALL(FILES ${eeg_HDRS} DESTINATION ${BIOSIGNAL_INSTALL_INCLUDE_DIR}/${BIOSIGNAL_LIB_API}/biosignal/eeg)
INSTALL(EXPORT biosignal-targets DESTINATION ${BIOSIGNAL_INSTALL_LIB_DIR}/${BIOSIGNAL_LIB_API})


